<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <link rel="stylesheet" href="../static/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="../static/bootstrap-table/bootstrap-table.css">
  <script src="../static/jquery/jquery-3.6.0.js"></script>
  <script src="../static/bootstrap/js/bootstrap.js"></script>
  <script src="../static/bootstrap-table/bootstrap-table.js"></script>
  <script src="../static/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
</head>
<body>
<table
  id="table"
  data-toggle="table"
  data-height="460"
  data-click-to-select="true"
  data-url="../json/data1.json">
  <thead>
    <tr>
      <th data-field="state" data-checkbox="true" data-formatter="stateFormatter"></th>
      <th data-field="id">ID</th>
      <th data-field="name">Item Name</th>
      <th data-field="price">Item Price</th>
    </tr>
  </thead>
</table>

<script>
  function stateFormatter(value, row, index) {
    if (index === 2) {
      return {
        disabled: true
      }
    }
    if (index === 5) {
      return {
        disabled: true,
        checked: true
      }
    }
    return value
  }
</script>
</body>
</html>
